home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 July / 07_02.iso / software / xq-xsetup / files / setup.exe / {app} / plugins / XQ Control Panel Hide 1.xpl < prev    next >
Text File  |  2001-12-25  |  4KB  |  113 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Control Panel\System Icons"
  5. "NAME"="Visible System Icons"
  6. "VERSION"="3.00"
  7. "OSVERSION"="111111"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Display "" applet"
  10. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  11. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  12. "DESCRIPTION 3"="NOTE #1: Hiding the "Internet Control Panel" applet will also hide the "Users" applet on Windows 9x systems."
  13. "DESCRIPTION 4"="NOTE #2: Hiding the "System Properties" applet also hides the "Add/Remove Hardware" applet on Windows 9x/ME systems."
  14. "DESCRIPTION 5"="NOTE #3: Hiding the "Mouse Control" applet also hides the "Keyboard","Fonts" and "Printers" applets on Windows 9x/ME systems."
  15. "AUTHOR"="Xteq Systems (CptSiskoX)"
  16. "CONTACTURL"="http://www.xteq.com"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="See also: MS KB Q207750"
  19. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  20. "COMMENT 3"="Thanks to JMRParbold@aol.com for the "multimedia and sounds" applet fix!"
  21.  
  22.  
  23. '******************************************************************
  24. '***                ONLY CHANGE LINES BELOW                    ****
  25. '******************************************************************
  26.  
  27. aryDesc=Array("System Properties","Display Properties","Add/Remove Programs","Internet Control Panel","Network Properties","Game Controllers / Joysticks","Modem","Telephony","Passwords Properties","Time and Date","Regional Options","Email","ODBC","Power Management","Mouse Control","DirectX","Scanner and Camera Properties","Desktop Themes","Accessibility Options","Add/Remove Hardware","Fax","Multimedia","Sounds","Infrared","HSP Modem")
  28. aryCPLs=Array("sysdm.cpl","desk.cpl","appwiz.cpl","Inetcpl.cpl","netcpl.cpl","joy.cpl","modem.cpl","telephon.cpl","password.cpl","timedate.cpl","intl.cpl","mlcfg32.cpl","odbccp32.cpl","powercfg.cpl","main.cpl","directx.cpl","sticpl.cpl","themes.cpl","access.cpl","hdwwiz.cpl","fax.cpl","mmsys.cpl","mmsys.cpl sounds","infrared.cpl","ptctrl.cpl") 
  29.  
  30. '******************************************************************
  31. sPath="HKCU\Control Panel\Don't Load\"
  32. sFile="CONTROL.INI"
  33. sFileSec="Don't Load"
  34.  
  35.  
  36.  
  37. SUB Plugin_Initialize
  38.  for i=0 to UBound(aryCPLs)
  39.      Call ReadIt(i+1,aryCPLs(i),aryDesc(i)) 
  40.  next 
  41. END SUB
  42.  
  43. Sub ReadIt(ItemNumber,VAL,Desc)
  44.   Call SetUIElement(ItemNumber,"Show '" & Desc & "' applet")
  45.  
  46.   If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  47.      'old (win32 1/2) INI style...
  48.      s=IniReadValue(sFile,sFileSec,VAL)
  49.      if len(s)>0 then
  50.         Call SetUIElementEx(ItemNumber,false)
  51.      else
  52.         Call SetUIElementEx(ItemNumber,true)
  53.      end if   
  54.   else
  55.      s=RegReadValue(sPath & VAL)
  56.      if IsEmpty(s)=false then
  57.         Call SetUIElementEx(ItemNumber,false)
  58.      else
  59.         Call SetUIElementEx(ItemNumber,true)
  60.      end if
  61.   end if
  62.  
  63. End Sub
  64.  
  65. 'Called when the Plugin should validate the Data the user has entered
  66. SUB Plugin_CheckData(ElementIndex)
  67. END SUB
  68.  
  69. 'Called when the Plugin should apply the changes
  70. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  71.  for i=0 to UBound(aryCPLs)
  72.      Call WriteIt(i+1,aryCPLs(i)) 
  73.  next 
  74.  
  75.  Call IndicateSettingChange()
  76. END SUB
  77.  
  78.  
  79. Sub WriteIt(ITM,VAL)
  80.  b=GetUIElementEx(ITM)
  81.  if b=true then
  82.     'Display it
  83.  
  84.     If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  85.        'win32 1/2
  86.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  87.     else
  88.        s=RegReadValue(sPath & VAL)
  89.        if IsEmpty(s)=false then
  90.           Call RegDeleteValue(sPath & VAL)
  91.        end if
  92.     end if
  93.  
  94.  else
  95.    'Hide it
  96.    
  97.    If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  98.       'win32 1/2
  99.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  100.    else
  101.       Call RegWriteValue(sPath & VAL,"1",1) 
  102.    end if
  103.  
  104.  end if   
  105. End Sub
  106.  
  107.  
  108. 'Called when the Plugin is about to be removed from memory
  109. SUB Plugin_Terminate
  110. END SUB
  111.  
  112.  
  113.